﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Data;

namespace DAO
{
    public class HoaDonDB
    {
        DataProvider dp = new DataProvider();

        public bool dThemHoaDon(int manv, int makh, float tongtien)
        {
            string sql = "insert into HoaDon values(GETDATE(), " + tongtien + ", " + makh + ", " + manv + ")";
            return dp.ExecuteNonQuery(sql);
        }

        public bool dThemHoaDonKhongKH(int manv, int tongtien)
        {
            string sql = "insert into HoaDon values(GETDATE(), " + tongtien + ", NULL, " + manv + ")";
            return dp.ExecuteNonQuery(sql);
        }
    }
}
